/**
 * Created by asus on 2017/4/28.
 */
import * as types from './mutationTypes'

export default {
  [types.LESSON_QUERY_LESSONS_BEGIN](state) {
    state.lessons = []
  },
  [types.LESSON_QUERY_LESSONS_SUC](state, {lessons, currentPage, totalCount}) {
    state.lessons = lessons
    state.currentPage = currentPage
    state.totalCount = totalCount
  },
  [types.LESSON_SET_EDITING_LESSON](state, {lesson}) {
    state.editingLesson = lesson
  },
  [types.LESSON_SET_SEARCH_TEXT](state, {searchText}) {
    state.searchText = searchText
  },
  [types.LESSON_DELETE_SUC](state) {
    //啥也不做
  },
  [types.LESSON_SEARCH_LESSONS](state, {lessons}) {
    //state.news = news;
  },
  [types.LESSON_SET_PAGE_MODEL](state, {modelType}) {
    //''
    state.pageModel = modelType
  },
  [types.LESSON_UPDATE_SUC](state) {
  },
  [types.LESSON_RELEASE_SUC](state) {
  }
}

